import http from '../../utils/http.js'


export function getWalletConfig(chargingGroupId){
	return new Promise((resolve,reject)=>{
		var params={
		   url:'/v1/app/pay/configuration',
		   method:'GET',
		   data:{
			   'chargingGroupId': chargingGroupId ? chargingGroupId :''
		   },
		   callBack:(res)=>{
			if(res.code==0){
			 resolve(res)
			}
			else{
			 reject(res.msg)
			}
		}
	  }
	  http.request(params)
	})
}


export function getRechargeList(consumptionType,page,size=20){
	return new Promise((resolve,reject)=>{
		var params={
		   url:'/v1/app/member/get/detail/record',
		   method:'GET',
		   data:{
			   consumptionType: consumptionType,
			   current: page,
			   size: size
		   },
		   callBack:(res)=>{
			if(res.code==0){
			 resolve(res)
			}
			else{
			 reject(res.msg)
			}
		}
	  }
	  http.request(params)
	})
	
}